﻿using System;

using NUnit.Framework;
using Spring.Testing.NUnit;
using VisualAgile.Model;
using VisualAgile.IBLL;

namespace VisualAgile.UnitTest
{
    [TestFixture]
    public  class FeelingsManagerTest :AbstractTransactionalDbProviderSpringContextTests
    {
        protected override string[] ConfigLocations
        {
            get
            {
                return new String[] { "objects.xml" };
            }
        }

        protected IFeelingsManager FeelingsManager
        {
            get
            {
                return applicationContext.GetObject("FeelingsManagerTrans") as IFeelingsManager;
            }
        }

        [Test]
        public void SaveFeelingsTest()
        {
            Feelings feeling = FeelingsManager.NewFeeling();
            feeling.Date = DateTime.Now;
            feeling.Feeling = "good";

            FeelingsManager.Save(feeling);
            transactionManager.Commit(transactionStatus);
        }
    }
}
